<%--
  Created by IntelliJ IDEA.
  User: jshand
  Date: 2022-03-24
  Time: 11:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--
 http://127.0.0.1:8080/springmvc/list.jsp
 http://localhost:8080/springmvc/list.jsp
 http://192.168.3.3:8080/springmvc/list.jsp

--%>
<form action="${pageContext.request.contextPath}/userList"  >

    <input type="text" name="username"  value="${user.username}"/> <button type="submit">search</button>

</form>



<c:choose>
    <c:when test="${list == null}">
        <h3>暂无数据</h3>
    </c:when>
    <c:when test="${list!= null  and list.size() !=0}">
        <c:forEach items="${list}" var="user">
            <p>${user.id} -- ${user.username}</p>
        </c:forEach>
    </c:when>
    
    

</c:choose>




</body>
</html>
